<?php

namespace app\common\model;

use think\Model;

class Token extends Model
{
    // 表名
    protected $name = 'token';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'created_time';
    protected $updateTime = 'updated_time';

    public function add($data)
    {
        return $this->insert($data);
    }

    public function del($condition)
    {
        return $this->where($condition)->delete();
    }
}